<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Anime</title>
  <style>
    .blue {
      background-color: blue;
    }
    .green {
      background-color: green;
    }
  </style>
</head>

<body>
  <article onclick="myAnimation.play()">
    <div class="blue"> blue</div>
    <div class="green"> green</div>
  </article>

  <script type="text/javascript" src="anime-master/anime.min.js"></script>
  <script>
    var myAnimation = anime({
      targets: ['.blue', '.green'],
      translateX: '13rem',
      borderRadius: 8,
      duration: 2000,
      autoplay: false,
    });
  </script>

</body>

</html>